<template>
<div class="data_statistics">
    <div class="form">
        <div class="table">
            <span class="title">订单总数</span>
            <span class="value">1192</span>
        </div>
        <div class="table">
            <span class="title">成交数</span>
            <span class="value">1026</span>
        </div>
        <div class="table">
            <span class="title">未成交数</span>
            <span class="value">166</span>
        </div>
        <div class="table">
            <span class="title">成交率</span>
            <span class="value">86.1%</span>
        </div>
    </div>
    <Charts />
    <div class="footer">
        <Histogram />
        <div class="Conical column diagram">
            <dv-scroll-board :config="config" style="width:100%;height:100%" />
        </div>
    </div>
</div>
</template>

<script>
import { reactive, toRefs } from 'vue'
import Charts from '@/components/Charts.vue'
import Histogram from '@/components/histogram.vue'
export default {
components:{
    Charts,
    Histogram
},
setup(){
 const data= reactive({
        config:{
            header:['发布人', '交易人', '商品名','商品类别','交易状态'],
            data:[ 
                ['小民', '小明', '尺子','学习用品','交易成功'],
                ['花花', '草草', '《假如给我三天光明》','书籍','交易成功'],
                ['小民', '小明', '尺子','学习用品','交易成功'],
                ['花花', '草草', '《假如给我三天光明》','书籍','交易成功'],
                ['小民', '小明', '尺子','学习用品','交易成功'],
                ['花花', '草草', '《假如给我三天光明》','书籍','交易成功'],
                ['小民', '小明', '尺子','学习用品','交易成功'],
                ['花花', '草草', '《假如给我三天光明》','书籍','交易失败'],
                ['小民', '小明', '尺子','学习用品','交易成功'],
                ['花花', '草草', '《假如给我三天光明》','书籍','交易成功'],
                ['小民', '小明', '尺子','学习用品','交易成功'],
                ['花花', '草草', '《假如给我三天光明》','书籍','交易成功'],
                ['小民', '小明', '尺子','学习用品','交易成功'],
                ['花花', '草草', '《假如给我三天光明》','书籍','交易失败'],
                ['小民', '小明', '尺子','学习用品','交易成功'],
                ['花花', '草草', '《假如给我三天光明》','书籍','交易成功'],
            ],
        showValue: true,
        headerBGC: 'rgba(174, 52, 199, 0.3)',
        oddRowBGC: 'rgba(147, 251, 255, 0.4)',
        evenRowBGC: 'rgba(241, 180, 253, 0.4)',
        columnWidth: ['80','80','160','85','80']
        }
    })
    
    return{
        ...toRefs(data)
    }
}
}
</script>

<style lang="scss" scoped>
.form {
    width: 100%;
    height: 100px;
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
    .table {
        width: 25%;
        height: 90px;
        margin-right: 20px;
        margin-bottom: 10px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background: rgba(255, 226, 255, 0.3);
        border-radius: 4%;
        box-shadow: 0 4px 8px 0 rgba(248, 3, 228, 0.2), 0 6px 20px 0 rgba(234, 5, 255, 0.19); 
        &:nth-child(4n) {
            margin-right: 0;
        }
        .title {
            line-height: 28px;
            font-size: 20px;
            text-shadow: 0px 0px 10px rgba(241, 180, 253, 0.8);
            color: rgba(174, 52, 199, 0.5);
            margin-top: 10px;
        }
        .value {
            line-height: 48px;
            font-size: 22px;
            font-family: D-DIN-Bold;
            margin-top: 5px;
            text-shadow: 0px 0px 8px rgba(171, 213, 214, 0.8);
            color: #49ebf7;
        }
    }
}
.charts {
    width: 100%;
    height: 60%;
}
.footer {
    width: 100%;
    height: 190px;
    overflow: hidden;
    display: flex;
    margin-top: -40px;
    .Conical {
        margin-top: 60px;
    }
}
</style>